﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace DiskCheck
{
    public class Speech
    {
        //private static SpeechSynthesizer synth = new SpeechSynthesizer();//朗读器
        //public static void Read(string text)
        //{
        //    //foreach (var item in synth.GetInstalledVoices())
        //    //{
        //    //    Console.WriteLine(item);
        //    //}
        //    //synth.SelectVoiceByHints(VoiceGender.Male);
        //    //synth.SelectVoice("Microsoft Huihui Desktop");
        //    //synth.SelectVoiceByHints(VoiceGender.Male, VoiceAge.Adult);
        //    synth.Speak(text);
        //}

        public static void Read()
        {
            for (int i = 0; i < 10; i++)//保持10次
            {
                Console.Beep(1000, 100);//声音频率hz， 播放时间 ms
                Thread.Sleep(100);//停止时间 ms
            }
        }
    }
}
